home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / vol15n11.zip / HKD.ZIP / HKDSRC.ZIP / HKDDLG.H < prev    next >
C/C++ Source or Header  |  1996-03-24  |  3KB  |  108 lines

  1. // HKDdlg.h : header file
  2.  
  3. // HotKey Detective version 1.0
  4. // Copyright (c) 1996 Ziff-Davis Publishing
  5. // First published in PC Magazine June 11, 1996
  6. // Author: Gregory A. Wolking
  7.  
  8. // Global control function for our worker thread.
  9. UINT Watch_File_System(LPVOID pParam);
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CHKDDlg dialog
  13.  
  14. class CHKDDlg : public CDialog
  15. {
  16. // Construction
  17. public:
  18.     CHKDDlg(CWnd* pParent = NULL);    // standard constructor
  19.  
  20. // Dialog Data
  21.     //{{AFX_DATA(CHKDDlg)
  22.     enum { IDD = IDD_HKD_DIALOG };
  23.     CButton    m_cmdPrint;
  24.     CStatic    m_lblShortcut;
  25.     CStatic    m_lblFilename;
  26.     CStatic    m_lblWarning;
  27.     CButton    m_cmdRefresh;
  28.     CButton    m_chkAutoScan;
  29.     CButton    m_cmdExplore;
  30.     CListBox    m_lstKeys;
  31.     CListBox    m_lstFiles;
  32.     //}}AFX_DATA
  33.  
  34.     // Class Wizard generated virtual function overrides
  35.     //{{AFX_VIRTUAL(CHKDDlg)
  36.     protected:
  37.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  38.     //}}AFX_VIRTUAL
  39.  
  40. // Implementation
  41. protected:
  42.  
  43. // Default code generated by the App Wizard
  44.  
  45.     HICON m_hIcon;
  46.     // Generated message map functions
  47.     //{{AFX_MSG(CHKDDlg)
  48.     virtual BOOL OnInitDialog();
  49.     afx_msg void OnPaint();
  50.     afx_msg HCURSOR OnQueryDragIcon();
  51.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  52.     afx_msg void OncmdRefresh();
  53.     afx_msg void OnSelchangelstKeys();
  54.     afx_msg void OnDblclklstKeys();
  55.     afx_msg void OncmdExplore();
  56.     afx_msg void OnCancel();
  57.     afx_msg void OnchkAutoScan();
  58.     afx_msg void OnSize(UINT nType, int cx, int cy);
  59.     afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR * lpMMI);
  60.     afx_msg void OncmdPrint();
  61.     //}}AFX_MSG
  62.     DECLARE_MESSAGE_MAP()
  63.  
  64. // Custom code for this app only.
  65.  
  66. // Protected member variables.
  67.     CDialog dlg_Scanning;
  68.     char key_code, shift_mask, ext_key_flag;
  69.      CString start_menu_folder, desktop_folder;
  70.     CWinThread* my_thread;
  71.     HANDLE hmy_mutex;
  72.  
  73. // Protected member functions.
  74.     BOOL Add_List_Items(LPCTSTR key, LPCTSTR file);
  75.     BOOL Check_One_File(LPCTSTR fname);
  76.     BOOL Get_Folder_Paths(void);
  77.     BOOL Read_My_Settings(void);
  78.     BOOL Retrieve_Setting(HKEY hk, char* setting, CString* value);
  79.     BOOL Scan_One_Directory(LPCTSTR start_path, BOOL walk_tree);
  80.     void Adjust_Controls(void);
  81.     void Check_Dupes(void);
  82.     void Do_Error_Message(LPCTSTR msg);
  83.     char Get_Key_Codes(HANDLE infile, DWORD code_offset, DWORD mask_offset, DWORD ext_flag_offset);
  84.     void Kill_Worker(void);
  85.     void Launch_Explorer(void);
  86.     void Launch_Worker(void);
  87.     void Print_List(void);
  88.     void Print_Line(CString* line, BOOL which_font);
  89.     void Save_My_Settings(void);
  90.     void Show_Warning(LPCTSTR warning);
  91.  
  92. // Declaring this global function as a "friend" allows it to access our
  93. // member variables and functions without having to expose them as public.
  94.     friend UINT Watch_File_System(LPVOID pParam);
  95.  
  96. // Private member variables.
  97. private:
  98.     int Line_Width(LPCTSTR line);
  99.     long min_track_x;
  100.     long min_track_y;
  101. // Variables used only by our print routine.
  102.     HDC hDC;
  103.     RECT text_area;
  104.     int page_width, page_height, one_inch_x, one_inch_y;
  105.     HFONT norm_font, ul_font;
  106.     BOOL use_custom_font;
  107. };
  108.